package cate.common.table.area;

import cate.common.table.ESheet;
import cate.common.util.XT;

/** 省市 */
public class AreaProvinceSheet extends ESheet<AreaProvinceRow> {
    @Override
    public String getSheetName() {
        return "省市";
    }

    @Override
    protected AreaProvinceRow buildRow() {
        return new AreaProvinceRow();
    }

    public int random() {
        int size = this.getList().size();
        if (size > 0) {
            return this.getList().get(XT.randomIndex(size)).code;
        }
        return 0;
    }
}
